<template>
	<view >
		
		<!-- 	<van-tabs :active="active" title-active-color='#00C6C2' @change='onchange'>
			  <van-tab title="全部">
				  <orderall></orderall>
			  </van-tab>
			  <van-tab title="待付款">
				  <tobepaid></tobepaid>
			  </van-tab>
			  <van-tab title="待确认">
				  <tobeconfirmed></tobeconfirmed>
			  </van-tab>
			  <van-tab title="待使用">
				  <tobeused></tobeused>
			  </van-tab>
			  <van-tab title="待评价">
				  <tobeevaluated></tobeevaluated>
			  </van-tab>
			</van-tabs> -->
			<view class="tabls">
				<view v-for="(item,index) in list" :key='index' :class="{actv:active==index}" @click="conts(index)">{{item}}</view>
				
			</view>
			<!-- <view style="height: 4rpx;width: 60rpx; background: #1EBBBD ;" class="s"></view>	 -->
			<view>
				 <orderall v-if="active==0"></orderall>
				 <tobepaid v-if="active==1"></tobepaid>
				 <tobeconfirmed v-if="active==2"></tobeconfirmed>
				 <tobeused v-if="active==3"></tobeused>
				 <tobeevaluated v-if="active==4"></tobeevaluated>
				 
			</view>
			
			
		
	</view>
</template>

<script>
	import tobepaid from './tobepaid.vue'
	import tobeconfirmed from './tobeconfirmed.vue'
	import tobeused from './tobeused.vue'
	import tobeevaluated from './tobeevaluated.vue'
	import orderall from './order_all.vue'
	export default {
		data(){
			return {
				active:0,
				list:['全部','待付款','待确认','待使用','待评价']
				
				
			}
		},
		components:{
			tobepaid,
			tobeconfirmed,
			tobeused,
			tobeevaluated,
			orderall
		},
		methods:{
			onchange(e){
				console.log(e)
			},
			conts(index){
				this.active = index
			}
			
		},
	async onLoad(option) {
			
			this.$nextTick(function(){
				this.active = option.actived
			})
	
		
		},
		mounted() {
			
			
		},
		computed:{
			
		}
		
	}
</script>

<style >
	page{
		background: #EFEFEF;
	}
</style>
<style scoped lang="less">
	.tabls{
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 46rpx 26rpx;		
		font-size: 3r2px;
		font-family: PingFang;
		font-weight: 500;
		color: #9B9B9B;
		background: white;
		margin-bottom: 15rpx;
		padding-bottom: 0;
		
	}
	view{
		padding-bottom: 26rpx;
	}
	.actv{
		
		font-size: 32rpx;
		font-family: PingFang;
		font-weight: bold;
		color: #00C6C2;
		border-bottom: 4rpx solid #1EBBBD;
	}
	.s{
		transform: translateX(30rpx);
	}
</style>
